#include "hs_rasterview.h"

int hs::raster::padding::_none_pre_id(int x, int Nx)
{
    return x;
}

int hs::raster::padding::_none_post_id(int x, int Nx)
{
    return x;
}

int hs::raster::padding::_sysmetric_pre_id(int x, int Nx)
{
    // y + x = 0
    int y = -x;
    return y;
}

int hs::raster::padding::_sysmetric_post_id(int x, int Nx)
{
    // y + x = 2*(Nx - 1)
    return 2*(Nx - 1) - x;
}

int hs::raster::padding::_replicate_pre_id(int x, int Nx)
{
    // y = 0
    return 0;
}

int hs::raster::padding::_replicate_post_id(int x, int Nx)
{
    // y = Nx-1
    return Nx - 1;
}

int hs::raster::padding::_circular_pre_id(int x, int Nx)
{
    int y = Nx + x;
    return y;
}

int hs::raster::padding::_circular_post_id(int x, int Nx)
{
    int y = x - Nx;
    return y;
}
